<?php
namespace App\Models;

use Illuminate\Database\Eloquent\Model;

/**
 *
 * @author Joker
 * `question_id` int(11) NOT NULL COMMENT '帖子编号',
	`thumb` varchar(255) NOT NULL COMMENT '封面图片',
	sort   MEDIUMINT(6) NOT NULL DEFAULT 0 COMMENT '排序 越大越靠前',
	`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
	`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,  
 */
class BbsHots extends Model
{

    protected $table="bbs_hots";
    
    protected $primaryKey = 'question_id';
    
    protected $fillable = ['question_id','thumb','sort','intro'];
    
    /**
     * @return \Illuminate\Database\Eloquent\Relations\HasOne
     */
    public function getQuestion()
    {
        return $this->hasOne('App\Models\BbsQuestion','id','question_id');
    }
}